/*
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2022-08-16 15:03:11
 * @LastEditors: 李天惊 uf_lee@163.com
 * @LastEditTime: 2022-09-01 11:20:32
 * @FilePath: \ahbs\uc_sys\src\api\uc\app\index.ts
 * Copyright (c) 2022 by 李天惊 uf_lee@163.com, All Rights Reserved.
 * 应用接口
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()

import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 列表
export const ucAppListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucAppList',
      data: data
    }
  })
}

// 新增
export const ucAppAddApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucAppAdd',
      data: data
    }
  })
}

// 查看
export const ucAppSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucAppSee',
      data: data
    }
  })
}

// 修改
export const ucAppEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucAppEdit',
      data: data
    }
  })
}

// 删除
export const ucAppDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucAppDel',
      data: data
    }
  })
}

// 删除
export const ucAppBatchDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucAppBatchDel',
      data: data
    }
  })
}
